package concurrent.threadLocal;

public class ThreadLocalDemo {

    public static void main(String[] args) {
        ThreadLocal<Long> threadLocal = new ThreadLocal<>();

        new Thread(()->{
            threadLocal.set(1L);
            threadLocal.remove();
            System.out.println(threadLocal.get());
        }).start();


        new Thread(()->{
            threadLocal.set(2L);
            System.out.println(threadLocal.get());
        }).start();
    }
}
